Optimal. Leaf size=60 \[ -\frac {\left (1-\frac {b^2}{a^2}\right ) \log (a+b \sin (c+d x))}{b d}-\frac {b \log (\sin (c+d x))}{a^2 d}-\frac {\csc (c+d x)}{a d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.12, antiderivative size = 60, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {2837, 12, 894} \[ -\frac {\left (1-\frac {b^2}{a^2}\right ) \log (a+b \sin (c+d x))}{b d}-\frac {b \log (\sin (c+d x))}{a^2 d}-\frac {\csc (c+d x)}{a d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 894
Rule 2837
Rubi steps
\begin {align*} \int \frac {\cos (c+d x) \cot ^2(c+d x)}{a+b \sin (c+d x)} \, dx &=\frac {\operatorname {Subst}\left (\int \frac {b^2 \left (b^2-x^2\right )}{x^2 (a+x)} \, dx,x,b \sin (c+d x)\right )}{b^3 d}\\ &=\frac {\operatorname {Subst}\left (\int \frac {b^2-x^2}{x^2 (a+x)} \, dx,x,b \sin (c+d x)\right )}{b d}\\ &=\frac {\operatorname {Subst}\left (\int \left (\frac {b^2}{a x^2}-\frac {b^2}{a^2 x}+\frac {-a^2+b^2}{a^2 (a+x)}\right ) \, dx,x,b \sin (c+d x)\right )}{b d}\\ &=-\frac {\csc (c+d x)}{a d}-\frac {b \log (\sin (c+d x))}{a^2 d}-\frac {\left (1-\frac {b^2}{a^2}\right ) \log (a+b \sin (c+d x))}{b d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.10, size = 54, normalized size = 0.90 \[ \frac {\left (b^2-a^2\right ) \log (a+b \sin (c+d x))-a b \csc (c+d x)+b^2 (-\log (\sin (c+d x)))}{a^2 b d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.50, size = 69, normalized size = 1.15 \[ -\frac {b^{2} \log \left (\frac {1}{2} \, \sin \left (d x + c\right )\right ) \sin \left (d x + c\right ) + {\left (a^{2} - b^{2}\right )} \log \left (b \sin \left (d x + c\right ) + a\right ) \sin \left (d x + c\right ) + a b}{a^{2} b d \sin \left (d x + c\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.67, size = 72, normalized size = 1.20 \[ -\frac {\frac {b \log \left ({\left | \sin \left (d x + c\right ) \right |}\right )}{a^{2}} + \frac {{\left (a^{2} - b^{2}\right )} \log \left ({\left | b \sin \left (d x + c\right ) + a \right |}\right )}{a^{2} b} - \frac {b \sin \left (d x + c\right ) - a}{a^{2} \sin \left (d x + c\right )}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.15, size = 72, normalized size = 1.20 \[ -\frac {\ln \left (a +b \sin \left (d x +c \right )\right )}{b d}+\frac {b \ln \left (a +b \sin \left (d x +c \right )\right )}{d \,a^{2}}-\frac {1}{d a \sin \left (d x +c \right )}-\frac {b \ln \left (\sin \left (d x +c \right )\right )}{a^{2} d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.77, size = 57, normalized size = 0.95 \[ -\frac {\frac {b \log \left (\sin \left (d x + c\right )\right )}{a^{2}} + \frac {{\left (a^{2} - b^{2}\right )} \log \left (b \sin \left (d x + c\right ) + a\right )}{a^{2} b} + \frac {1}{a \sin \left (d x + c\right )}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.81, size = 118, normalized size = 1.97 \[ \frac {\ln \left (a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+a\right )\,\left (\frac {b}{a^2}-\frac {1}{b}\right )}{d}-\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,a\,d}-\frac {\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,a\,d}+\frac {\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}{b\,d}-\frac {b\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a^2\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\cos {\left (c + d x \right )} \cot ^{2}{\left (c + d x \right )}}{a + b \sin {\left (c + d x \right )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________